﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MahjongCreatRoomShow : MonoBehaviour {

    public GameObject CloseBtn;
    public GameObject GoldPatternBtn;
    public GameObject RoomCardPatternBtn;

    public GameObject RoomCardPattern;
    public GameObject GoldPattern;

    private void Awake()
    {
        UIEventListener.Get(CloseBtn).onClick = ButtonClick;
        UIEventListener.Get(GoldPatternBtn).onClick = ButtonClick;
        UIEventListener.Get(RoomCardPatternBtn).onClick = ButtonClick;
        //GoldPattern.SetActive(false);
    }
    void ButtonClick(GameObject button)
    {
        if (button.name == "CloseBtn")
        {
            Destroy(gameObject);
            
        }
        else if (button.name == "GoldPatternBtn")
        {
           // Debug.Log(11111111111);
            RoomCardPattern.SetActive(false);
            GoldPattern.SetActive(true);
        }
        else if (button.name == "RoomCardPatternBtn")
        {
            GoldPattern.SetActive(false);
            RoomCardPattern.SetActive(true);
        }
             
    }
}
